#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int factorial(int n)
{
	int sum=1;
	int j = n;
	for (int i = 0; i < n; i++)
	{
		if(j>=1)
		  sum *= j;
		j--;
	}
	return sum;
}
int main()
{
	int n;
	scanf("%d", &n);
	int ret = factorial(n);
	printf("%d", ret);
	return 0;
}